Optimal. Leaf size=262 \[ -\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-8 a^2 C+6 a b B-b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (-8 a^3 C+6 a^2 b B+5 a b^2 C-3 b^3 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 C \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 b^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.57, antiderivative size = 262, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3029, 2988, 3023, 2752, 2663, 2661, 2655, 2653} \[ -\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-8 a^2 C+6 a b B-b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (6 a^2 b B-8 a^3 C+5 a b^2 C-3 b^3 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 C \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2988
Rule 3023
Rule 3029
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx &=\int \frac {\cos ^2(c+d x) (B+C \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx\\ &=-\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \int \frac {\frac {1}{2} a b (b B-a C)+\frac {1}{2} \left (2 a^2-b^2\right ) (b B-a C) \cos (c+d x)+\frac {1}{2} b \left (a^2-b^2\right ) C \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{b^2 \left (a^2-b^2\right )}\\ &=-\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}+\frac {4 \int \frac {\frac {1}{4} b^2 \left (3 a b B-2 a^2 C-b^2 C\right )+\frac {1}{4} b \left (6 a^2 b B-3 b^3 B-8 a^3 C+5 a b^2 C\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^3 \left (a^2-b^2\right )}\\ &=-\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}-\frac {\left (6 a b B-8 a^2 C-b^2 C\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^3}+\frac {\left (6 a^2 b B-3 b^3 B-8 a^3 C+5 a b^2 C\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{3 b^3 \left (a^2-b^2\right )}\\ &=-\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}+\frac {\left (\left (6 a^2 b B-3 b^3 B-8 a^3 C+5 a b^2 C\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{3 b^3 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (\left (6 a b B-8 a^2 C-b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{3 b^3 \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \left (6 a^2 b B-3 b^3 B-8 a^3 C+5 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (6 a b B-8 a^2 C-b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}-\frac {2 a^2 (b B-a C) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.46, size = 189, normalized size = 0.72 \[ \frac {2 \left (b \sin (c+d x) \left (\frac {a \left (-4 a^2 C+3 a b B+b^2 C\right )}{b^2-a^2}+b C \cos (c+d x)\right )+\frac {\sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a-b) \left (8 a^2 C-6 a b B+b^2 C\right ) F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+\left (-8 a^3 C+6 a^2 b B+5 a b^2 C-3 b^3 B\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )}{a-b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.61, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \cos \left (d x + c\right )^{3} + B \cos \left (d x + c\right )^{2}\right )} \sqrt {b \cos \left (d x + c\right ) + a}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 7.41, size = 954, normalized size = 3.64 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\cos \left (c+d\,x\right )\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________